package 链表;

import util.ListNode;

public class findMidNode {
    public static void main(String[] args) {

    }

    public ListNode findMidNode(ListNode head){
        ListNode fast = head;
        ListNode slow = head;
        while (fast.next != null && fast.next.next != null){
            slow = slow.next;
            fast = fast.next.next;
        }
        return slow;
    }
}
